package com.ruoyi.shop.service;

import java.util.List;
import com.ruoyi.shop.domain.ShopProduct;
import com.ruoyi.shop.domain.vo.ShopProductSimpleVo;
import com.ruoyi.shop.domain.vo.ShopProductVo;
import com.ruoyi.shop.vo.ProductVo;

/**
 * 商品Service接口
 * 
 * @author Alan Zhang
 * @date 2021-09-14
 */
public interface IShopProductService 
{
    /**
     * 查询商品
     * 
     * @param id 商品主键
     * @return 商品
     */
    public ShopProduct selectShopProductById(Long id);

    /**
     * 查询商品
     * 部分信息
     * @param id 商品主键
     * @return 商品
     */
    public ShopProductSimpleVo selectShopProductSimpleVoById(Long id);

    /**
     * 查询商品列表
     * 
     * @param shopProduct 商品
     * @return 商品集合
     */
    public List<ShopProduct> selectShopProductList(ShopProduct shopProduct);

    /**
     * 新增商品
     * 
     * @param shopProduct 商品
     * @return 结果
     */
    public int insertShopProduct(ShopProduct shopProduct);

    /**
     * 修改商品
     * 
     * @param shopProduct 商品
     * @return 结果
     */
    public int updateShopProduct(ShopProduct shopProduct);

    /**
     * 批量删除商品
     * 
     * @param ids 需要删除的商品主键集合
     * @return 结果
     */
    public int deleteShopProductByIds(String ids);

    /**
     * 删除商品信息
     * 
     * @param id 商品主键
     * @return 结果
     */
    public int deleteShopProductById(Long id);

    /**
     * 导入商品
     * @param dataList
     * @param optName
     * @return
     */
    public String importProductInfo(List<ProductVo> dataList, Long supplierId, String optName);

    /**
     * 导入同步商品价格
     * @param dataList
     * @param optName
     * @return
     */
    public String importProductPrice(List<ProductVo> dataList, Long supplierId, String optName);

    /**
     * 商品编号 查询商品信息
     * @param productNo
     * @return
     */
    public ShopProductVo selectShopProductByProductNo(String productNo);

    /**
     * 根据名称 商品Id
     * @param title
     * @return
     */
    public Long selectShopProductByProductName(String title);


    /**
     *小程序 查询商品
     *
     * @param id 商品主键
     * @return 商品
     */
    public ShopProductSimpleVo selectShopProductBoById(Long id);

    /**
     * 小程序 新品产品
     * @return
     */
    public List<ShopProductSimpleVo> selectNewShopProduct();

    /**
     * 小程序 热卖产品
     * @param realSalesCount 销售量
     * @return
     */
    public List<ShopProductSimpleVo> selectHotShopProduct(Integer realSalesCount);

    /**
     * 小程序 特价产品
     * @return
     */
    public List<ShopProductSimpleVo> selectIsSpecialShopProduct();

    /**
     * 小程序 普通产品
     * @return
     */
    public List<ShopProductSimpleVo> selectShopProductAll();

    /**
     * 分类下的商品
     * @param categoryId
     * @return
     */
    public List<ShopProductSimpleVo> selectJoinShopProductByCategoryId(Long categoryId);

    /**
     * 根据商品名称搜索
     * @param title
     * @return
     */
    public List<ShopProductSimpleVo> selectShopProductByTitle(String title);
}
